import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter_app/colors/my_colors.dart';
import 'package:flutter_app/screen_page.dart';

/// 精选
class HandPickPage extends StatefulWidget {
  @override
  _HandPickPageState createState() => _HandPickPageState();
}

class _HandPickPageState extends State<HandPickPage> {
  List<String> _tagList = ["全部", "干货", "测评", "趣闻", "生活"];

  @override
  Widget build(BuildContext context) {
    return Container(
      height: double.infinity,
      width: double.infinity,
      child: Column(
        children: <Widget>[
          Container(
            height: height(20),
            width: double.infinity,
            child: ListView.builder(
                scrollDirection: Axis.horizontal,
                itemCount: _tagList.length,
                itemBuilder: (context, index) => Container(
                      margin: EdgeInsets.only(right: width(3)),
                      decoration: BoxDecoration(
                          color: MyColors.back_bright_gray,
                          borderRadius:
                              BorderRadius.all(Radius.circular(height(10)))),
                      child: Center(
                        child: Text(_tagList[index]),
                      ),
                    )),
          ),
          Expanded(
            child: Container(
              height: double.infinity,
              child: ListView.builder(
                  itemCount: 20,
                  itemBuilder: (context, index) => Container(
                        padding: EdgeInsets.only(
                            left: width(12), right: width(12), top: width(12)),
                        color: Colors.white,
                        child: Column(
                          children: <Widget>[
                            Row(
                              mainAxisAlignment: MainAxisAlignment.spaceAround,
                              children: <Widget>[
                                Column(
                                  mainAxisAlignment:
                                      MainAxisAlignment.spaceBetween,
                                  children: <Widget>[
                                    Text("稳态：MIT高材生酿造出的神奇IPA",
                                        style: TextStyle(
                                            color: MyColors.color_333333,
                                            fontSize: sp(14))),
                                    Row(
                                      children: <Widget>[
                                        Text("王狗蹬",
                                            style: TextStyle(
                                                color: MyColors.color_666666,
                                                fontSize: sp(12))),
                                        Text("王狗蹬211",
                                            textAlign: TextAlign.end,
                                            style: TextStyle(
                                                color: MyColors.color_666666,
                                                fontSize: sp(12))),
                                      ],
                                    )
                                  ],
                                ),
                                SizedBox(
                                  width: width(10),
                                ),
                                Image.network(
                                    "https://image.xiajiucai.com/billionbottle/indexAsk/2020_04_05_2de49b7d_20f7_4854_9802_4149119d12ed_522x343.jpg",
                                    width: width(100),
                                    height: width(50))
                              ],
                            )
                          ],
                        ),
                      )),
            ),
            flex: 1,
          )
        ],
      ),
    );
  }
}
